import App from '../app';
import AsyncHome, { loadData as loadHomeData } from '../pages/Home';
import AsyncUserInfo, { loadData as loadUserInfoData } from '../pages/UserInfo';
import { RouteConfig } from 'react-router-config';
import NotFound from '../pages/NotFound';

export default [
    {
        component: App,
        routes: [
            {
                path: "/",
                exact: true,
                component: AsyncHome,
                loadData: loadHomeData,
            },
            {
                path: "/UserInfo/:id",
                component: AsyncUserInfo,
                loadData: loadUserInfoData,
            },
            {
                component: NotFound
            }
        ]
    }

] as RouteConfig[]